<template>
	<view class="content">
		<!-- // app端图表引入 -->
		<line-chart :chartData='chartData' width="100%" height="600rpx"></line-chart>
	</view>
</template>

<script>
	import LineChart from './components/LineChart'
	export default {
		components: {
			LineChart
		},
		data() {
			return {
				title: 'Hello',
				chartData: {}
			};
		},
		onLoad() {
			this.getData()
		},
		onReady() {},
		methods: {
			getData() {
				this.chartData = {
					xLabelName: ["奉城镇", "南桥镇", '四团镇', '青村镇', '柘林镇'],
					value1: [23, 84, 101, 74, 87],
					value2: [13, 54, 71, 24, 57]
				}
				setTimeout(()=>{
					this.chartData.value2 = [10, 20, 30, 10, 50]
					this.chartData.value1 = [30, 85, 50, 40, 60]
				},4000)
			}
		}
	};
</script>
<style>
	button{
		margin-top: 40rpx;
	}
</style>
